import axios from '@/utils/http'

//接口列表--------
//---------患者管理--------

//获取列表
export const getPatients = "/Patient/management/findPatientList";
//新增 
export const addPatients = "/Patient/management/addPatient";
//转交
export const transferApi = "/Patient/management/transPatient";
//高级搜索
export const advancedPaApi = "/Patient/management/searchPatient";
//修改
export const editPaApi = "/Patient/management/updatePatient";
//删除
export const deletePaApi = "/Patient/management/deletePatient";
//普搜
export const searchPaApi = "/Patient/management/findPatientByName";


//---------患者跟进---------
//获取列表
export const getFollowApi = "/patient/follow/findFollowList";
//新增
export const addFollowApi = "/patient/follow/addFollow";
//修改
export const editFoApi = "/patient/follow/updateFollow";
//删除
export const deleteFoApi = "/patient/follow/deleteFollow";
//普搜
export const searchFoApi = "/patient/follow/findFollowByName"

//-------------患者公海---------
//获取列表
export const getPaSeasApi = "/Patient/common/findAllPatientList";
//分配
export const allocationApi = "/Patient/common/assignPatients";
//普搜
export const searchSeasApi = "/Patient/common/getCommonPatientListByName";
//领取
export const receiveSeasApi = "/Patient/common/receivePatient";

//分配---转交---获取部门
export const GetDepartmentApi = "/userManagement/deptManagement/findDeptList1";
//分配---转交---获取部门人员
export const getDepPersonApi = "/userManagement/user/findUserByDepId"



//----------患者报表------------
//患者报表接口
export const patientsRepApi="/patient/report/findReportList";
//患者跟进接口
export const patientsRepFollApi="/patient/report/findReportFollow";
//患者区域接口
export const patientsAreaApi="/patient/report/findReportArea";
//患者年度报告接口
export const patientsYearApi="/patient/report/findYearReport";



//--------封装网络请求方法

const patients = {
    //-----患者管理-----
    getPatientsList(params) {
        console.log(params);
        return axios.get(getPatients, { params })
    },
    //新增 
    addNewPatients(params) {
        return axios.post(addPatients, params)
    },
    //转交
    transfer(params) {
        return axios.post(transferApi, params)
    },
    //高级搜索
    advancedSearch(params) {
        return axios.post(advancedPaApi, params)
    },
    //修改
    editPatient(params) {
        return axios.post(editPaApi, params)
    },
    //删除
    deletePatient(params) {
        return axios.post(deletePaApi + "?id=" + params)
    },
    //普搜
    searchPatient(name, currentPage, pageSize) {
        return axios.post(searchPaApi + "?name=" + name + "&currentPage=" + currentPage + "&pageSize=" + pageSize)
    },

    //---------患者跟进----------
    getFollowList(params) {
        return axios.get(getFollowApi, { params })
    },
    //新增
    addFollow(params) {
        return axios.post(addFollowApi, params)
    },
    //普搜
    searchFollowPa(name, currentPage, pageSize) {
        return axios.get(searchFoApi + "?name=" + name + "&currentPage=" + currentPage + "&pageSize=" + pageSize)
    },
    //修改
    editFollow(params) {
        return axios.post(editFoApi, params)
    },
    //删除
    deleteFollow(params) {
        return axios.post(deleteFoApi + "?id=" + params)
    },

    //-------患者公海----------
    //获取列表
    getPaSeas(params) {
        return axios.get(getPaSeasApi, { params })
    },

    //分配患者
    allocationSeas(params) {
        return axios.post(allocationApi, params )
    },

    //普搜
    searchSeasPa(params) {
        return axios.get(searchSeasApi, { params })
    },
    // 领取患者
    receiveSeas(patientId,userId) {
        return axios.post(receiveSeasApi+"?patientId="+patientId+"&userId="+userId);
    },
    // receiveSeasApi+"?patientId="+patientId+"userId="+userId


    //分配---转交---获取医院部门
    getPaDepartment() {
        return axios.get(GetDepartmentApi);
    },
    //分配---转交---获取部门人员
    getDepartmentPerson(params) {
        return axios.post(getDepPersonApi + "?depId=" + params)
    },



    //----------患者报表------------
    getPatientsReport(){
        return axios.get(patientsRepApi);
    },
    getPatientsFoll(){
        return axios.get(patientsRepFollApi);
    },
    getPatientsArea(){
        return axios.get(patientsAreaApi);
    },
    getPatientsYear(){
        return axios.get(patientsYearApi)
    }


}




//导出
export default patients